﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;

namespace MensUnoShop.Models
{
    public interface ITranscation
    {
        int? GetCashid(string txid, int? amount, int? paytype);
        
        //信用卡交易
        string DoCreditcardTrade(string txid, int orderprice, ref string cashid);
        //超商代收交易-新增交易
        string DoCSTrade(string txid, int amount, string paytitle, DateTime duedate, string payname, string payphone, PayType pt, ref string cashid);
        //超商代收交易-重新取得交易資訊
        string DoCSTradeQuery(int cashid);

        string GetMD5Hash(string input);
        
        PayInfo GetPayInfo(int cashid);
        PayInfoCreditcard GetPayInfoCreditcard(int cashid);
        PayInfoCS GetPayInfoCS(int cashid);

        void UptCashOrder(PayInfo pi);
        
        void UptCreditcardData(int? cashid, int period, string checksumsend, string checksumreceive, string prc, string src,
            string approvalcode, string bankresponsecode, string batchnumber, string cardnumber, string cardissuebank, string engname, string status);

        void AddCreditcardData(int? cashid, int period, string checksumsend, string checksumreceive, string prc, string src,
            string approvalcode, string bankresponsecode, string batchnumber, string cardnumber, string cardissuebank, string engname, string status);       
        
        void UptCSData(int? cashid, string paytitle, DateTime duedate, string payname, string payphone, string hash);

        void AddUptCSDataData(int? cashid, string paytitle, DateTime duedate, string payname, string payphone, string hash);

        void UptCoLog(int? cashid, string newstatus);
    }
}